<?php

namespace Sifast\ProjectBundle\Admin;

use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Form\FormMapper;

class AvantagesNatureAdmin extends Admin
{
 
    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
        ->with('L1')
            ->add('mtAvNatureLogement','text',array(
                'label'=> 'Avantage nature logement:',))
            ->add('mtAvNatureVoiture','text',array(
                'label'=> 'Avantage nature voiture:',))
        -> end()
        ->with('L2')        
            ->add('mtAvNatureNourriture','text',array(
                'label'=> 'Avantage nature nourriture:',))
            ->add('mtAvNatureAutre','text',array(
                'label'=> 'Avantage nature autre:',))
       ->end()     ; 
           
            
    }

    protected function configureDatagridFilters(DatagridMapper $datagridMapper)
    {
        $datagridMapper
            ->add('mtAvNatureLogement')
            ->add('mtAvNatureVoiture')
            ->add('mtAvNatureNourriture')
            ->add('mtAvNatureAutre'); 
            
    }

    protected function configureListFields(ListMapper $listMapper)
    {
        $listMapper
            ->addIdentifier('mtAvNatureLogement')
            ->add('mtAvNatureVoiture')
            ->add('mtAvNatureNourriture')
            ->add('mtAvNatureAutre'); 
            
            }
}